---
layout: m1x_soap
title: Product Custom Value Update
---

<h3><a name="product_custom_option_value.update-Module%3AComplexProductAPI"></a>Module: Complex Product API</h3>


<h4><a name="product_custom_option_value.update-Resource%3Aproductcustomoptionvalue"></a>Resource: product_custom_option_value</h4>


<h5><a name="product_custom_option_value.update-Method%3A"></a>Method:</h5>

<ul>
	<li>product_custom_option_value.update (SOAP V1)</li>
	<li>catalogProductCustomOptionValueUpdate (SOAP V2)</li>
</ul>


<p>Allows you to update the product custom option value.</p>

<p><b>Arguments:</b></p>

<table><tbody>
<tr>
<th> Type </th>
<th> Name </th>
<th> Description </th>
</tr>
<tr>
<td> string </td>
<td> sessionId </td>
<td> Session ID </td>
</tr>
<tr>
<td> string <br class="atl-forced-newline" /> </td>
<td> valueId </td>
<td> Value ID </td>
</tr>
<tr>
<td> array </td>
<td> data </td>
<td> Array of catalogProductCustomOptionValueUpdateEntity </td>
</tr>
<tr>
<td> string </td>
<td> storeId </td>
<td> Store view ID or code (optional) </td>
</tr>
</tbody></table>


<p><b>Return:</b></p>

<table><tbody>
<tr>
<th> Type </th>
<th> Description </th>
</tr>
<tr>
<td> boolean </td>
<td> True if the custom option value is updated </td>
</tr>
</tbody></table>


<p>The <b>catalogProductCustomOptionValueUpdateEntity</b> content is as follows:</p>

<table><tbody>
<tr>
<th> Type </th>
<th> Name </th>
<th> Description </th>
</tr>
<tr>
<td> string </td>
<td> title <br class="atl-forced-newline" /> </td>
<td> Option value title </td>
</tr>
<tr>
<td> string <br class="atl-forced-newline" /> </td>
<td> price <br class="atl-forced-newline" /> </td>
<td> Option value price </td>
</tr>
<tr>
<td> string <br class="atl-forced-newline" /> </td>
<td> price_type <br class="atl-forced-newline" /> </td>
<td> Price type. Possible values are as follows: "fixed" or "percent" <br class="atl-forced-newline" /> </td>
</tr>
<tr>
<td> string <br class="atl-forced-newline" /> </td>
<td> sku <br class="atl-forced-newline" /> </td>
<td> Custom option value row SKU <br class="atl-forced-newline" /> </td>
</tr>
<tr>
<td> string <br class="atl-forced-newline" /> </td>
<td> sort_order <br class="atl-forced-newline" /> </td>
<td> Custom option value sort order </td>
</tr>
</tbody></table>


<p><b>Faults:</b></p>

<table><tbody>
<tr>
<th> Fault Code </th>
<th> Fault Message </th>
</tr>
<tr>
<td> 101 </td>
<td> Option value with requested id does not exist. </td>
</tr>
<tr>
<td> 103 </td>
<td> Option with requested id does not exist. </td>
</tr>
<tr>
<td> 104 </td>
<td> Invalid option type. </td>
</tr>
<tr>
<td> 107 </td>
<td> Error while updating an option value. Details are in the error message. </td>
</tr>
<tr>
<td> 108 </td>
<td> Title field is required. </td>
</tr>
</tbody></table>



<h4><a name="product_custom_option_value.update-Examples"></a>Examples</h4>

<h5><a name="product_custom_option_value.update-RequestExampleSOAPV1"></a>Request Example SOAP V1</h5>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div>
		<pre class="theme: Default; brush: php; gutter: false">$proxy = new SoapClient('http://magentohost/api/soap/?wsdl');
$sessionId = $proxy-&gt;login('apiUser', 'apiKey');

$productOptionId = 1;// Existing option ID

// Get last value from option values list
$optionValues = $proxy-&gt;call($sessionId, "product_custom_option_value.list", array($productOptionId));
$optionValue = reset($optionValues);
$valueId = $optionValue['value_id'];
// Update custom option value
$customOptionValue = array(
    "title" =&gt; "new title",
    "price" =&gt; 12.00,
    "price_type" =&gt; "percent",
    "sku" =&gt; "custom_text_option_2",
    "sort_order" =&gt; 2
);
$resultCustomOptionValueUpdate = $proxy-&gt;call(
    $sessionId,
    "product_custom_option_value.update",
    array(
         $valueId,
         $customOptionValue
    )
);</pre>
		</div>
</div></div>


<h5><a name="product_custom_option_value.update-RequestExampleSOAPV2"></a>Request Example SOAP V2</h5>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div>
		<pre class="theme: Default; brush: php; gutter: false">$proxy = new SoapClient('http://magentohost/api/v2_soap/?wsdl');

$sessionId = $proxy-&gt;login('apiUser', 'apiKey');

$result = $proxy-&gt;catalogProductCustomOptionValueUpdate($sessionId, '2', array(
'title' =&gt; 'value',
'price' =&gt; '20',
'price_type' =&gt; 'fixed',
'sku' =&gt; 'sku'
));

var_dump($result);</pre>
		</div>
</div></div>



<h5><a name="product_custom_option_value.update-RequestExampleSOAPV2%28WSIComplianceMode%29"></a>Request Example SOAP V2 (WS-I Compliance Mode)</h5>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div>
		<pre class="theme: Default; brush: php; gutter: false">$proxy = new SoapClient('http://magentohost/api/v2_soap/?wsdl');

$sessionId = $proxy-&gt;login((object)array('username' =&gt; 'apiUser', 'apiKey' =&gt; 'apiKey'));

$result = $proxy-&gt;catalogProductCustomOptionValueUpdate((object)array('sessionId' =&gt; $sessionId-&gt;result, 'valueId' =&gt; '2', 'data' =&gt; ((object)array(
'title' =&gt; 'value',
'sku' =&gt; 'sku',
'price' =&gt; '199',
'price_type' =&gt; 'percent'
))));

var_dump($result-&gt;result);</pre>
		</div>
</div></div>

